package mayun;

import java.rmi.server.*;
import java.sql.SQLException;
import java.rmi.*;

public class DataServiceImpl extends UnicastRemoteObject implements DataService {
	private DataManager dm;
	public DataServiceImpl() throws RemoteException
	{
		super();
		dm = new DataManager();
	}
	
	@Override
	public Boolean CreateTable() throws RemoteException {
		return dm.CreateTable();
	}

	@Override
	public int QueryGrade(String id) throws RemoteException {
		return dm.QueryGrade(id);		
	}

	@Override
	public Boolean addGrade(String n, String id, int g) throws RemoteException {
		return dm.addGrade(n, id, g);
	}
	public void free() {
		dm.freeConn();
	}
}
